#include <stdio.h>

int c(int x,int y)
{
    int z;
    if((x==0)||(y==1)||(y==x+1))return(1);
    z=c(x-1,y-1)+c(x-1,y);
    return(z);
}
int main()
{
    int i, j, n = 13;
    printf("N=");
    while (n > 12)
    {
        scanf("%d", &n);
    }
    for(int i=0;i<n;i++)
    {
        for(j=0;j<12-i;j++)printf(" ");
        for(j=1;j<=i+1;j++)printf("%6d",c(i,j));
        printf("\n");
    }
    return 0;
}
